import ElckerServiceApi from '~/utils/axios';

class ElckerMenusService extends ElckerServiceApi {
  private urlComPath: string = '/elckerApi/menusService/';
  getElckerUserMenus(data: any) {
    return this.getRequest({
      url: this.urlComPath + 'getElckerUserMenus',
      params: data,
    });
  }
  getElckerUserMenuDatas(data: ElckerUser) {
    return this.getRequest({
      url: this.urlComPath + 'getElckerUserMenuDatas',
      params: data,
    });
  }
}

// 单列模式返回对象
let ElckerMenusApi;
export default (() => {
  if (ElckerMenusApi) return ElckerMenusApi;
  ElckerMenusApi = new ElckerMenusService();
  return ElckerMenusApi;
})();
